<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>http::icy_stream</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__http__header/version/overload2.html" title="http::header::version (2 of 2 overloads)">
<link rel="next" href="boost__beast__http__icy_stream/async_read_some.html" title="http::icy_stream::async_read_some">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__header/version/overload2.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__icy_stream/async_read_some.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__http__icy_stream"></a><a class="link" href="boost__beast__http__icy_stream.html" title="http::icy_stream">http::icy_stream</a>
</h4></div></div></div>
<p>
        Stream wrapper to process Shoutcast HTTP responses.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.synopsis"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/experimental/http/icy_stream.hpp" target="_top">boost/beast/experimental/http/icy_stream.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">class</span> <span class="identifier">NextLayer</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">icy_stream</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.types"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/executor_type.html" title="http::icy_stream::executor_type"><span class="bold"><strong>executor_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type of the executor associated with the object.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/lowest_layer_type.html" title="http::icy_stream::lowest_layer_type"><span class="bold"><strong>lowest_layer_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type of the lowest layer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/next_layer_type.html" title="http::icy_stream::next_layer_type"><span class="bold"><strong>next_layer_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type of the next layer.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.member_functions"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.member_functions">Member
        Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/async_read_some.html" title="http::icy_stream::async_read_some"><span class="bold"><strong>async_read_some</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Start an asynchronous read.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/async_write_some.html" title="http::icy_stream::async_write_some"><span class="bold"><strong>async_write_some</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Start an asynchronous write.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/get_executor.html" title="http::icy_stream::get_executor"><span class="bold"><strong>get_executor</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Get the executor associated with the object.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/icy_stream.html" title="http::icy_stream::icy_stream"><span class="bold"><strong>icy_stream</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/lowest_layer.html" title="http::icy_stream::lowest_layer"><span class="bold"><strong>lowest_layer</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Get a reference to the lowest layer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/next_layer.html" title="http::icy_stream::next_layer"><span class="bold"><strong>next_layer</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Get a reference to the next layer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/operator_eq_.html" title="http::icy_stream::operator="><span class="bold"><strong>operator=</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/read_some.html" title="http::icy_stream::read_some"><span class="bold"><strong>read_some</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Read some data from the stream.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/write_some.html" title="http::icy_stream::write_some"><span class="bold"><strong>write_some</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Write some data to the stream.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__icy_stream/icy_stream_dtor_.html" title="http::icy_stream::~icy_stream"><span class="bold"><strong>~icy_stream</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Destructor.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.description"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.description">Description</a>
      </h5>
<p>
        This wrapper replaces the word "ICY" in the first HTTP response
        received on the connection, with "HTTP/1.1". This allows the Beast
        parser to be used with Shoutcast servers, which send a non-standard HTTP
        message as the response.
      </p>
<p>
        For asynchronous operations, the application must ensure that they are are
        all performed within the same implicit or explicit strand.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.thread_safety"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.thread_safety">Thread Safety</a>
      </h5>
<p>
        <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
      </p>
<p>
        <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe. The application
        must also ensure that all asynchronous operations are performed within the
        same implicit or explicit strand.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h5"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.example"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.example">Example</a>
      </h5>
<p>
        To use the stream template with an <code class="computeroutput"><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span></code>, you would write:
      </p>
<pre class="programlisting"><span class="identifier">http</span><span class="special">::</span><span class="identifier">icy_stream</span><span class="special">&lt;</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span><span class="special">&gt;</span> <span class="identifier">is</span><span class="special">{</span><span class="identifier">io_context</span><span class="special">};</span>
</pre>
<p>
        Alternatively, you can write:
      </p>
<pre class="programlisting"><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span> <span class="identifier">sock</span><span class="special">{</span><span class="identifier">io_context</span><span class="special">};</span>
<span class="identifier">http</span><span class="special">::</span><span class="identifier">icy_stream</span><span class="special">&lt;</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span><span class="special">&amp;&gt;</span> <span class="identifier">is</span><span class="special">{</span><span class="identifier">sock</span><span class="special">};</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h6"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.template_parameters"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.template_parameters">Template
        Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Type
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">NextLayer</span></code>
                </p>
              </td>
<td>
                <p>
                  The type representing the next layer, to which data will be read
                  and written during operations. For synchronous operations, the
                  type must support the SyncStream concept. For asynchronous operations,
                  the type must support the AsyncStream concept.
                </p>
              </td>
</tr></tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h7"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.remarks"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.remarks">Remarks</a>
      </h5>
<p>
        A stream object must not be moved or destroyed while there are pending asynchronous
        operations associated with it.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__icy_stream.h8"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__icy_stream.concepts"></a></span><a class="link" href="boost__beast__http__icy_stream.html#beast.ref.boost__beast__http__icy_stream.concepts">Concepts</a>
      </h5>
<p>
        <span class="bold"><strong>AsyncStream</strong></span>, <span class="bold"><strong>SyncStream</strong></span>
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2016, 2017 Vinnie Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__header/version/overload2.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__icy_stream/async_read_some.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
